package com.qsw.crashcollectionlib.bean;

public class ExceptionMessage {

    /**
     * 异常
     */
    private Throwable exception;
    /**
     * 附加信息
     */
    private String otherMessage;
    /**
     * 异常抛出时间
     */
    private long throwTime;

    /**
     * 异常将要保存的日志文件路径
     */
    private String logPath;

    /**
     * 异常将要保存的日志文件名
     */
    private String logName;

    /**
     * 是否是简短保存，即不添加空行和间隔符
     */
    private boolean simpleSave;

    /**
     * 是否保存在日志中
     */
    private boolean saveToLog;

    public ExceptionMessage() {
    }

    public ExceptionMessage(Throwable exception, String otherMessage, long throwTime, String logPath, String logName, boolean simpleSave, boolean saveToLog) {
        super();
        this.exception = exception;
        this.otherMessage = otherMessage;
        this.throwTime = throwTime;
        this.logPath = logPath;
        this.logName = logName;
        this.simpleSave = simpleSave;
        this.saveToLog = saveToLog;
    }

    public Throwable getException() {
        return exception;
    }

    public void setException(Exception exception) {
        this.exception = exception;
    }

    public String getOtherMessage() {
        return otherMessage;
    }

    public void setOtherMessage(String otherMessage) {
        this.otherMessage = otherMessage;
    }

    public long getThrowTime() {
        return throwTime;
    }

    public void setThrowTime(long throwTime) {
        this.throwTime = throwTime;
    }

    public String getLogPath() {
        return logPath;
    }

    public void setLogPath(String logPath) {
        this.logPath = logPath;
    }

    public String getLogName() {
        return logName;
    }

    public void setLogName(String logName) {
        this.logName = logName;
    }

    public boolean isSimpleSave() {
        return simpleSave;
    }

    public void setSimpleSave(boolean simpleSave) {
        this.simpleSave = simpleSave;
    }

    public boolean isSaveToLog() {
        return saveToLog;
    }

    public void setSaveToLog(boolean saveToLog) {
        this.saveToLog = saveToLog;
    }

    @Override
    public String toString() {
        return "ExceptionMessage [exception=" + exception + ", otherMessage="
                + otherMessage + ", throwTime=" + throwTime + ", logPath="
                + logPath + ", logName=" + logName + ", saveToLog=" + saveToLog
                + "]";
    }

}
